package com.zhoug.demo.sendpush.http;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.HeaderMap;
import retrofit2.http.POST;
import retrofit2.http.Url;

public interface BaseRequests {



    /**
     *
     *华为推送消息 鉴权
     * @return
     */
    @POST()
    @FormUrlEncoded
    Observable<ResponseBody> huaweiAuthentication(@Url String url,
                                                  @Field("grant_type") String grant_type,
                                                  @Field("client_id") String client_id,
                                                  @Field("client_secret") String client_secret);

    /**
     *
     *华为推送消息
     * @param params
     * @return
     */
    @POST()
    Observable<ResponseBody> pushByHuawei(@Url String url, @HeaderMap Map<String,String> header, @Body() Object params);

}
